/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-08-30 14:39:04
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//所有的dcscloud改成api/dmscloud
export const getorgPositionList = params => axios.get('api/dmscloud.basedata/basedata/orgPosition', { params})//获取权限列表
export const getRolelist = params => axios.get('api/dmscloud.basedata/basedata/roles', { params }); //获取角色列表
export const getRoledetail = (params, id) => axios.get('api/dmscloud.basedata/basedata/orgPosition/role/' + `${id}`, { params }); //获取权限角色列表
export const setRolelist = params => axios.post('api/dmscloud.basedata/basedata/roles', params); //权限添加角色
export const getRoleLists = params => axios.get('api/dmscloud.basedata/basedata/orgPosition/role/' + `${params.id}`, { params }); //获取权限角色列表
export const setEmitRole = params => axios.put('api/dmscloud.basedata/basedata/orgPosition/' + `${params.id}`, params);
export const setdeptaddRole = params => axios.put('api/dmscloud.basedata/basedata/orgPosition/', params);
export const getdeptlistRole = params => axios.put('api/dmscloud.basedata/basedata/orgPosition/depart' + `${params.id}`, params); //获取部门列表
export const getdeptTree = () => axios.get('api/dmscloud.basedata/company/org/tree'); //权限添加角色
